package com.qztech.sdk.model;

/**
 * Copyright (C), 深圳市东乘电子科技有限公司
 * Carate By YangZhong
 */
public enum Grouping {
    UNKNOWN(-1, new int[]{}),
    GROUP1_2(0, new int[]{0, 1}),
    GROUP3_4(1, new int[]{2, 3}),
    GROUP5_6(2, new int[]{4, 5}),
    GROUP7_8(3, new int[]{6, 7}),
    GROUP1_2_3_4(0xFF00, new int[]{0,1,2,3}),
    GROUP5_6_7_8(0xFF01, new int[]{4,5,6,7}),
    GROUP_ALL(0xFFFF, new int[]{0,1,2,3,4,5,6,7}),

    ;
    private int mIndex;
    private int mGroupIndexs[];
    Grouping(int index, int[] chIndexs){
        mIndex = index;
        mGroupIndexs = chIndexs;
    }

    public int[] getGroupIndexs() {
        return mGroupIndexs;
    }

    public int getIndex() {
        return mIndex;
    }

    @Override
    public String toString() {
        switch(this){

            case GROUP1_2:
                return "GROUP1_2";
            case GROUP3_4:
                return "GROUP3_4";
            case GROUP5_6:
                return "GROUP5_6";
            case GROUP7_8:
                return "GROUP7_8";
            case GROUP1_2_3_4:
                return "GROUP1_2_3_4";
            case GROUP5_6_7_8:
                return "GROUP5_6_7_8";
            case GROUP_ALL:
                return "GROUP_ALL";
            default:
                return "UNKNOWN";
        }
    }
}
